package com.byxx.gtz.devicemonitoringsysejb.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * DeviceScheme entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "DEVICE_SCHEME", schema = "DEVICE_FSX")

public class DeviceScheme implements java.io.Serializable {

	// Fields

	private String schemeId;
	private String schemeName;
	private String schemeContent;
	private String floor;
	private Set<DeviceSchemeDetail> deviceSchemeDetails = new HashSet<DeviceSchemeDetail>(0);

	// Constructors

	/** default constructor */
	public DeviceScheme() {
	}

	/** minimal constructor */
	public DeviceScheme(String schemeId) {
		this.schemeId = schemeId;
	}

	/** full constructor */
	public DeviceScheme(String schemeId, String schemeName, String schemeContent, String floor,
			Set<DeviceSchemeDetail> deviceSchemeDetails) {
		this.schemeId = schemeId;
		this.schemeName = schemeName;
		this.schemeContent = schemeContent;
		this.floor = floor;
		this.deviceSchemeDetails = deviceSchemeDetails;
	}

	// Property accessors
	@Id

	@Column(name = "SCHEME_ID", unique = true, nullable = false, length = 36)

	public String getSchemeId() {
		return this.schemeId;
	}

	public void setSchemeId(String schemeId) {
		this.schemeId = schemeId;
	}

	@Column(name = "SCHEME_NAME", length = 50)

	public String getSchemeName() {
		return this.schemeName;
	}

	public void setSchemeName(String schemeName) {
		this.schemeName = schemeName;
	}

	@Column(name = "SCHEME_CONTENT", length = 100)

	public String getSchemeContent() {
		return this.schemeContent;
	}

	public void setSchemeContent(String schemeContent) {
		this.schemeContent = schemeContent;
	}

	@Column(name = "FLOOR", length = 50)

	public String getFloor() {
		return this.floor;
	}

	public void setFloor(String floor) {
		this.floor = floor;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "deviceScheme")

	public Set<DeviceSchemeDetail> getDeviceSchemeDetails() {
		return this.deviceSchemeDetails;
	}

	public void setDeviceSchemeDetails(Set<DeviceSchemeDetail> deviceSchemeDetails) {
		this.deviceSchemeDetails = deviceSchemeDetails;
	}

}